package com.sh.redis.controller;

public class Sushu {

    public static void main(String[] args) {
        System.out.println(countSushu(102));
    }


    public static int countSushu(int i){
        int count = 0;
        boolean[] temp = new boolean[i];
        for(int m = 2; m < i ;m++){
            if(!temp[m]){
                count++;
                for(int j = m*m; j < i; j += m){
                    temp[j] = true;
                }
            }
        }
        return count;
    }
}
